package week07.data_obs3;

/**
 * Created by zhangxiaokun on 2018/3/13.
 */
public class ConcreteSubject extends Subject {
    private String state;

    public String getState() {
        return state;
    }

    public void change(String newState) {
        //状态改变
        state = newState;
        System.out.println("状态改变---被观察者  状态改变：" + state);
        //通知各个观察者
        nodifyObservers(state);
    }
}
